IMBanner Class Reference
| Inherits from | UIView |
| Declared in | IMBanner.h |
Overview
- Class to integrate banner ads in your application *
- Adding banner ads is demonstrated in the code fragment below
Implement the following in the viewcontroller
IMBanner *bannerView = [[IMBanner alloc] initWithFrame:CGRectMake(0, 50, 320, 50) placementId:11203280001]; [self.view addSubview:self.bannerView]; [self.bannerView load];The code snippet above demonstrates a dead simple integration. Your application code can additionally listen for lifecycle events on the banner ad by implementing the IMBannerDelegate.
Tasks
-
delegateproperty -
refreshIntervalproperty -
keywordsproperty -
extrasproperty -
placementIdproperty -
transitionAnimationproperty -
– initWithFrame:placementId: -
– initWithFrame:placementId:delegate: -
– load -
– shouldAutoRefresh: -
– setRefreshInterval:
Properties
delegate
The delegate for the banner to notify of events.
@property (nonatomic, weak) id<IMBannerDelegate> delegateDiscussion
The delegate for the banner to notify of events.
Declared In
IMBanner.hextras
Any additional information to be passed to InMobi.
@property (nonatomic, strong) NSDictionary *extrasDiscussion
Any additional information to be passed to InMobi.
Declared In
IMBanner.hkeywords
A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”
@property (nonatomic, strong) NSString *keywordsDiscussion
A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”
Declared In
IMBanner.hplacementId
The placement ID for this banner.
@property (nonatomic) long long placementIdDiscussion
The placement ID for this banner.
Declared In
IMBanner.hInstance Methods
initWithFrame:placementId:
Initializes an IMBanner instance with the specified placementId.
- (instancetype)initWithFrame:(CGRect)frame placementId:(long long)placementIdParameters
- frame
CGRect for this view, according to the requested size.
- placementId
the placement Id registered on the InMobi portal.
Discussion
Initializes an IMBanner instance with the specified placementId.
Declared In
IMBanner.hinitWithFrame:placementId:delegate:
Initializes an IMBanner instance with the specified placementId and delegate.
- (instancetype)initWithFrame:(CGRect)frame placementId:(long long)placementId delegate:(id<IMBannerDelegate>)delegateParameters
- frame
CGRect for this view, according to the requested size.
- placementId
the placement Id registered on the InMobi portal.
- delegate
The delegate to receive callbacks
Discussion
Initializes an IMBanner instance with the specified placementId and delegate.
Declared In
IMBanner.h